import React, {Component} from 'react'
import {View, Text, StyleSheet, TouchableOpacity} from 'react-native'
import Icon from 'react-native-vector-icons/Ionicons'


class AddNew extends Component {
  static defaultProps = {
    onPress: () => {
    },
    onLongPress: () => {
    },
    backgroundColor: '#4077F8'
  };

  render() {
    const {onPress, onLongPress, backgroundColor} = this.props
    return (
      <TouchableOpacity
        style={[styles.add_button, {backgroundColor: backgroundColor}]}
        onPress={onPress}
        onLongPress={onLongPress}
      >
        <Icon name={'md-add'} color={'white'} size={25}/>
      </TouchableOpacity>
    )
  }
}

const styles = StyleSheet.create({
  add_button: {
    borderRadius: 25,
    height: 50,
    width: 50,
    flex: 1,
    position: 'absolute',
    bottom: 20,
    right: 20,
    backgroundColor: 'red',
    padding: 15,
    alignItems: 'center',
    justifyContent: 'center'
  }
})

export default AddNew